<?php

require_once "core/application/models/mchangegender/mchangegender1.php";

class Mchangegender2 extends Mchangegender1 {

    private $_query;

    protected function changeGenderInDB($gender, $nick) {
        /**
         *  изменение пола
         * @param string $gender
         * @param string $login
         * @param string $nick
         * @return true or false
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "UPDATE `players` SET `gender` = '$gender' WHERE `account_name` = '$_SESSION[name]' AND `name` = '$nick'";
        return DB::getInstance()->sql($this->_query);
        DB::getInstance()->closeConnection();
        unset($this->_query);
    }

}

?>
